/**
 * \file Object.cpp
 *
 * ICC General Code Base
 * Written 2010-2011, by Anthony Berlin and Alexander Carlqvist
 *
 * This file is part of ICC.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "Object.h"

#include <iostream>
#include <boost/lexical_cast.hpp>

using std::string;

/**
 * \brief Copy constructors for the \c Object class.
 * \param other The \c Object to compare.
 */
Object::Object(const Object& other)
{
    if (this == &other)
        return;
}

Object::Object(const Object* other)
{
    if (this == other)
        return;
}

/**
 * \brief Compare the equality of this \c Object with another \c Object.
 * \param other The \c Object to compare.
 * \return \c true if they are the same object.
 */
bool Object::operator==(const Object& other) const
{
    return *this == other;
}

bool Object::operator==(const Object* other) const
{
    return *this == *other;
}

bool Object::operator!=(const Object& other) const
{
    return !(*this == other);
}

bool Object::operator!=(const Object* other) const
{
    return !(this == other);
}

/**
 * \brief Assignment operator \c =.
 * \param rhs The \c Object to assign to this \c Object.
 * \return Returns this \c Object.
 */
Object& Object::operator=(const Object& rhs)
{
    if (this == &rhs)
        return *this;

    return *this;
}

/**
 * \brief Convert this \c Object to a \c string.
 * \return A \c string representing the \c Object.
 */
string Object::to_string() const
{
    return (string)"<" + to_chars() + " : " + boost::lexical_cast<string>(this) + ">\n";
}

/**
 * \brief Convert this \c Object to a string of \c char*.
 * \return A \c char* string representing the \c Object.
 */
char* Object::to_chars() const
{
    return (char*)"Object";
}

/**
 * \brief Print a text version of this \c Object.
 */
void Object::print() const
{
    std::cout << to_string();
}
